﻿using RpcModel;
using SqlExecHelper;
using Wedonek.RpcStore.Service.Model;

namespace Wedonek.RpcStore.Service.DAL
{
        internal class ServerRunStateDAL : SqlBasicClass
        {
                public ServerRunStateDAL () : base ("ServerRunState")
                {

                }

                public ServerRunState Get (long serverId)
                {
                        return base.GetRow<long, ServerRunState> ("ServerId", serverId);
                }
                public void Delete(long serverId)
                {
                        base.Drop ("ServerId", serverId);
                }
                public ServerRunState[] Query (IBasicPage paging,out long count) 
                {
                        paging.InitOrderBy ("ServerId", true);
                        return base.Query<ServerRunState> (paging.OrderBy, paging.Index, paging.Size, out count);
                }

        }
}
